package com.lagou.rpc.consumer.client;

import lombok.Data;

import java.util.concurrent.ExecutionException;

/**
 * @author liuc
 * @date 2021/6/7
 * @description
 **/
@Data
public class RpcClientWrapper {
    private RpcClient rpcClient;
    private String nodePath;
    //上一次耗时时间
    private long lastTime;

    public Object send(String msg) throws ExecutionException, InterruptedException{
        return rpcClient.send(msg);
    }

    public RpcClientWrapper(String path, RpcClient client){
        this.nodePath = path;
        this.rpcClient = client;
    }

    public void close(){
        rpcClient.close();
    }
}
